.class public Lrexsee/core/animation/RexseeTransition;
.super Ljava/lang/Object;
.source "RexseeTransition.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field public static final EVENT_ONPAGEANIMATIONEND:Ljava/lang/String; = "onPageAnimationEnd"

.field public static final EVENT_ONPAGEANIMATIONREPEAT:Ljava/lang/String; = "onPageAnimationRepeat"

.field public static final EVENT_ONPAGEANIMATIONSTART:Ljava/lang/String; = "onPageAnimationStart"

.field public static final INTERFACE_NAME:Ljava/lang/String; = "Transition"


# instance fields
.field private final mActivity:Landroid/app/Activity;

.field private final mAnimationListener:Landroid/view/animation/Animation$AnimationListener;

.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private mEnable:Z

.field private mPostStyleText:Ljava/lang/String;

.field private final mReadyListener:Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;

.field private final mStartListener:Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;

.field private final mStopListener:Lrexsee/core/browser/clazz/StopListeners$StopListener;

.field private mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 2
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    const/4 v0, 0x0

    .line 164
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 41
    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    .line 42
    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    .line 43
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/animation/RexseeTransition;->mEnable:Z

    .line 48
    new-instance v0, Lrexsee/core/animation/RexseeTransition$1;

    invoke-direct {v0, p0}, Lrexsee/core/animation/RexseeTransition$1;-><init>(Lrexsee/core/animation/RexseeTransition;)V

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mAnimationListener:Landroid/view/animation/Animation$AnimationListener;

    .line 83
    new-instance v0, Lrexsee/core/animation/RexseeTransition$2;

    invoke-direct {v0, p0}, Lrexsee/core/animation/RexseeTransition$2;-><init>(Lrexsee/core/animation/RexseeTransition;)V

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStopListener:Lrexsee/core/browser/clazz/StopListeners$StopListener;

    .line 90
    new-instance v0, Lrexsee/core/animation/RexseeTransition$3;

    invoke-direct {v0, p0}, Lrexsee/core/animation/RexseeTransition$3;-><init>(Lrexsee/core/animation/RexseeTransition;)V

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStartListener:Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;

    .line 133
    new-instance v0, Lrexsee/core/animation/RexseeTransition$4;

    invoke-direct {v0, p0}, Lrexsee/core/animation/RexseeTransition$4;-><init>(Lrexsee/core/animation/RexseeTransition;)V

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mReadyListener:Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;

    .line 165
    iput-object p1, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    .line 166
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mActivity:Landroid/app/Activity;

    .line 167
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onPageAnimationStart"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 168
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onPageAnimationRepeat"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 169
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->eventList:Lrexsee/core/browser/clazz/EventList;

    const-string v1, "onPageAnimationEnd"

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/EventList;->add(Ljava/lang/String;)V

    .line 170
    return-void
.end method

.method static synthetic access$0(Lrexsee/core/animation/RexseeTransition;)Landroid/app/Activity;
    .locals 1

    .prologue
    .line 39
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mActivity:Landroid/app/Activity;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/core/animation/RexseeTransition;)Lrexsee/core/animation/AnimationStyleSheet;
    .locals 1

    .prologue
    .line 41
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    return-object v0
.end method

.method static synthetic access$2(Lrexsee/core/animation/RexseeTransition;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 42
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$3(Lrexsee/core/animation/RexseeTransition;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 40
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$4(Lrexsee/core/animation/RexseeTransition;)Lrexsee/core/widget/Div;
    .locals 1

    .prologue
    .line 45
    invoke-direct {p0}, Lrexsee/core/animation/RexseeTransition;->getPageDiv()Lrexsee/core/widget/Div;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$5(Lrexsee/core/animation/RexseeTransition;)Landroid/view/animation/Animation$AnimationListener;
    .locals 1

    .prologue
    .line 48
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mAnimationListener:Landroid/view/animation/Animation$AnimationListener;

    return-object v0
.end method

.method private getPageDiv()Lrexsee/core/widget/Div;
    .locals 1

    .prologue
    .line 46
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->containerDiv:Lrexsee/core/widget/Div;

    return-object v0
.end method


# virtual methods
.method public clearPostStyle()V
    .locals 1

    .prologue
    .line 198
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    .line 199
    return-void
.end method

.method public clearStyle()V
    .locals 1

    .prologue
    .line 183
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    .line 184
    return-void
.end method

.method public disable()V
    .locals 2

    .prologue
    .line 222
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->pageBeforeStartListeners:Lrexsee/core/browser/clazz/PageBeforeStartListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mStartListener:Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/PageBeforeStartListeners;->remove(Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;)V

    .line 223
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->stopListeners:Lrexsee/core/browser/clazz/StopListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mStopListener:Lrexsee/core/browser/clazz/StopListeners$StopListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/StopListeners;->remove(Lrexsee/core/browser/clazz/StopListeners$StopListener;)V

    .line 224
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->pageReadyListeners:Lrexsee/core/browser/clazz/PageReadyListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mReadyListener:Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/PageReadyListeners;->remove(Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;)V

    .line 225
    const/4 v0, 0x0

    iput-boolean v0, p0, Lrexsee/core/animation/RexseeTransition;->mEnable:Z

    .line 226
    return-void
.end method

.method public enable()V
    .locals 3

    .prologue
    .line 211
    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->hide()V

    .line 212
    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->disable()V

    .line 213
    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->hasAnimation()Z

    move-result v0

    if-nez v0, :cond_0

    .line 214
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->getInterfaceName()Ljava/lang/String;

    move-result-object v1

    const-string v2, "Invalid animation."

    invoke-virtual {v0, v1, v2}, Lrexsee/core/browser/Browser;->exception(Ljava/lang/String;Ljava/lang/String;)V

    .line 216
    :cond_0
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->pageBeforeStartListeners:Lrexsee/core/browser/clazz/PageBeforeStartListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mStartListener:Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/PageBeforeStartListeners;->add(Lrexsee/core/browser/clazz/PageBeforeStartListeners$PageBeforeStartListener;)V

    .line 217
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->pageReadyListeners:Lrexsee/core/browser/clazz/PageReadyListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mReadyListener:Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/PageReadyListeners;->add(Lrexsee/core/browser/clazz/PageReadyListeners$PageReadyListener;)V

    .line 218
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->stopListeners:Lrexsee/core/browser/clazz/StopListeners;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mStopListener:Lrexsee/core/browser/clazz/StopListeners$StopListener;

    invoke-virtual {v0, v1}, Lrexsee/core/browser/clazz/StopListeners;->add(Lrexsee/core/browser/clazz/StopListeners$StopListener;)V

    .line 219
    const/4 v0, 0x1

    iput-boolean v0, p0, Lrexsee/core/animation/RexseeTransition;->mEnable:Z

    .line 220
    return-void
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 28
    new-instance v0, Lrexsee/core/animation/RexseeTransition;

    invoke-direct {v0, p1}, Lrexsee/core/animation/RexseeTransition;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 24
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Transition"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 32
    new-instance v0, Lrexsee/core/animation/RexseeTransition;

    invoke-direct {v0, p1}, Lrexsee/core/animation/RexseeTransition;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getPostStyle()Ljava/lang/String;
    .locals 1

    .prologue
    .line 194
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    if-nez v0, :cond_0

    const-string v0, ""

    .line 195
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    goto :goto_0
.end method

.method public getStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 179
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    if-nez v0, :cond_0

    const-string v0, ""

    .line 180
    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/animation/AnimationStyleSheet;->getStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public hasAnimation()Z
    .locals 1

    .prologue
    .line 186
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    if-nez v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public hide()V
    .locals 2

    .prologue
    .line 229
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mActivity:Landroid/app/Activity;

    new-instance v1, Lrexsee/core/animation/RexseeTransition$5;

    invoke-direct {v1, p0}, Lrexsee/core/animation/RexseeTransition$5;-><init>(Lrexsee/core/animation/RexseeTransition;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 242
    return-void
.end method

.method public isEnabled()Z
    .locals 1

    .prologue
    .line 208
    iget-boolean v0, p0, Lrexsee/core/animation/RexseeTransition;->mEnable:Z

    return v0
.end method

.method public load(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2
    .param p1, "url"    # Ljava/lang/String;
    .param p2, "style"    # Ljava/lang/String;

    .prologue
    .line 202
    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->disable()V

    .line 203
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, ";animation-repeat:none;"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0, v0}, Lrexsee/core/animation/RexseeTransition;->setStyle(Ljava/lang/String;)V

    .line 204
    invoke-virtual {p0}, Lrexsee/core/animation/RexseeTransition;->enable()V

    .line 205
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v0, v0, Lrexsee/core/browser/Browser;->function:Lrexsee/core/browser/RexseeBrowser;

    invoke-virtual {v0, p1}, Lrexsee/core/browser/RexseeBrowser;->load(Ljava/lang/String;)V

    .line 206
    return-void
.end method

.method public setPostStyle(Ljava/lang/String;)V
    .locals 2
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 190
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    if-nez v0, :cond_0

    const-string v0, ""

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    .line 191
    :cond_0
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mPostStyleText:Ljava/lang/String;

    .line 192
    return-void
.end method

.method public setStyle(Ljava/lang/String;)V
    .locals 2
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 175
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    if-nez v0, :cond_0

    new-instance v0, Lrexsee/core/animation/AnimationStyleSheet;

    iget-object v1, p0, Lrexsee/core/animation/RexseeTransition;->mBrowser:Lrexsee/core/browser/Browser;

    invoke-direct {v0, v1}, Lrexsee/core/animation/AnimationStyleSheet;-><init>(Lrexsee/core/browser/Browser;)V

    iput-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    .line 176
    :cond_0
    iget-object v0, p0, Lrexsee/core/animation/RexseeTransition;->mStyleSheet:Lrexsee/core/animation/AnimationStyleSheet;

    invoke-virtual {v0, p1}, Lrexsee/core/animation/AnimationStyleSheet;->parseStyle(Ljava/lang/String;)Lrexsee/core/animation/AnimationStyleSheet;

    .line 177
    return-void
.end method
